<?php
/**
 * 系統名稱: Lotto 系統
 * 檔案說明: 專案管理-修改
 * $Author$
 * $Id$
 *
 */
include_once("../../config.inc.php");
session_start();
$_LangPath = "operate";
include_once(__Language_Path."/selectlanguage_admin.php");
include_once(__Admin_Path."/logincheck_admin_listdata.php");
$intLID = (int)$_data["LID"];
$isBlack = trim($_data["isBlack"]);
$isBlack = 1;

$arrPower = CheckUsePower("operate");
if($arrPower === false)ErrMsgOutputHTML("Error", "", 1);

?><!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> Wager List(<?php print $_SERVER["HTTP_HOST"];?>) </title>
<script language="JavaScript">
<!--
if(!window.opener)location.href = "<?php print __AdminReplaceLink;?>";
var BID = "";
var AutoRefreshID = 0;
var RSeconds = 0;

function ShowBlackList(){
	var i = 0, GDate = new Array();
	var TObj = document.getElementById("game_table");
	with(TObj){
		if(rows.length > 150)while(rows.length > 1)deleteRow(rows.length-1);
		for(i = 0; i < getData.Game.length; i++){
			if(parseFloat(getData.Game[i][3].replace(",", "")) < parseFloat(document.getElementById("ShowMinStake").value))continue;
			nowTR = insertRow();
			with(nowTR){
				nowTD = insertCell();
				nowTD.align = "center";
				nowTD.className = 'b_hline';
				GDate = getData.Game[i][1].split("-");
				nowTD.innerHTML = GDate[1]+"-"+GDate[2]+" "+getData.Game[i][2]+"<br><a style=\"color: #FF0000\">"+getData.Game[i][0]+"</a>"+"/<a style=\"color: #0000FF\">"+getData.Game[i][4]+"</a>";

				nowTD = insertCell();
				nowTD.align = "center";
				nowTD.className = 'b_hline';
				GDate = getData.Game[i][1].split("-");
				nowTD.innerHTML = getData.Game[i][6]+"<br>"+getData.Game[i][7]+"&nbsp;/&nbsp;"+getData.Game[i][8];

				nowTD = insertCell();
				nowTD.align = "right";
				nowTD.className = 'b_hline';
				nowTD.valign = "center";
				nowTD.innerHTML = getData.Game[i][3];
				nowTD = insertCell();
				nowTD.align = "left";
				nowTD.className = 'b_hline';
				nowTD.innerHTML = getData.Game[i][5];
			}
			nowTR = insertRow();
			nowTR.className = 'b_rig';
			with(nowTR){
				nowTD = insertCell();
				nowTD.colSpan = "4";
			}
			document.body.doScroll("scrollbarPageDown");
		}
	}
	document.getDataForm.BID.value = BID;
}

function AutoShow(){
	var oOption;
	document.getDataForm.submit();
	//setInterval("document.getDataForm.submit()", 10000);
	for(var i = 5; i <= 60; i += 5){
		oOption = document.createElement("OPTION");
		oOption.text = ((i < 10)?"0"+i.toString():i.toString()) + " sec";
		oOption.value = i;
		if(i == 10)oOption.selected = true;
		ReflashSec.add(oOption);
	}
	ChangeRefreshSec(ReflashSec);
}

//定時重整
function RClock(i){
	if (RSeconds == 0){
		document.getDataForm.submit();
		RSeconds = i;
	}
	RSeconds --;
	if(document.getElementById("RSec"))document.getElementById("RSec").innerHTML = RSeconds;
}

//選擇定時時間
function ChangeRefreshSec(obj){
	if(AutoRefreshID > 0)clearInterval(AutoRefreshID);
	AutoRefreshID = setInterval("RClock("+obj.value+")",1000);
}

function BlackClick(intBlack){
	var TObj = document.getElementById("game_table");
	with(TObj){
		while(rows.length > 1)deleteRow(rows.length-1);
	}
	if(intBlack == 1){
		document.getDataForm.isBlack.value = intBlack;
	}else{
		document.getDataForm.isBlack.value = "";
	}
	document.getDataForm.submit();
}

function ClearBlackList(){
	var i = 0, GDate = new Array();
	var TObj = document.getElementById("game_table");
	with(TObj){
		while(rows.length > 1)deleteRow(rows.length-1);
	}
}
//-->
</script>
<link rel="stylesheet" href="/css/backend.css" type="text/css">
<style>
<!--
	TR {
		font-size: 12px; font-family: "Arial"
	}
	.b_tab {
		padding-right: 2px; margin-top: 5px; padding-left: 2px; padding-top: 3px; background-color: #707A74
	}
	.b_tline_ft {
		color: #FFFFFF; background-color: #4e5a53; text-align: center
	}
	.b_rig {
		background-color: #FFFFFF; text-align: right
	}
	.b_hline {
		background-color:#FFFFFF;
	}
-->
</style>
</head>

<body onload="AutoShow()">
<!--<input type="radio" name="rBlack" onclick="BlackClick(1)" checked>
<a style="fint-size: 12px; cursor: hand;" id="BB1">Black</a><b> | </b><input type="radio" name="rBlack" onclick="BlackClick(0)"><a style="fint-size: 12px; cursor: hand; color: #0000FF" id="BB2">ALL</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//--><input type="button" onclick="ClearBlackList()" value="Clear" class="submit">&nbsp;&nbsp;
<?php print $_strOperate["RefreshWay"];//更新：?><select id="ReflashSec" onchange="ChangeRefreshSec(this)"></select>&nbsp;&nbsp;
<?php print $_strOperate["ShowMinStake"];//注額大於：?><input type="text" id="ShowMinStake" value="0" size="10">
&nbsp;&nbsp;[&nbsp;<a id="RSec" style="color: #FF0000;">00</a>&nbsp;]
<table class="b_tab" id="game_table" cellSpacing="1" cellPadding="0" width="520" 
      border="0"><tbody><tr class="b_tline_ft"><td width="120"><?php print $_strOperate["WGameTime"];?> / <?php print $_strOperate["WAccount"];?></td><td width="60">Parent</td><td width="50"><?php print $_strOperate["WStake"];?></td><td width="270"><?php print $_strOperate["WCont"];?></td></tr></tbody></table>
<iframe src="" width="110" height="110" name="getData"></iframe>
<form action="blackcontent.php" target="getData" name="getDataForm">
<input type="hidden" name="isBlack" value="">
<input type="hidden" name="BID" value="">
<input type="hidden" name="FileTime" value="">
<input type="hidden" name="LID" value="<?php print $intLID;?>">
</form>
</body>
</html>
<?php @mysql_close($$_Conn);?>